package model;

import java.util.Observable;

/**
 * Modello della nave del giocatore.
 * @author Max
 *
 */
public class Ship extends Observable{
	
	private static final float SHIP_ACCELERATION = 0.5f;	//accelerazione della nave, in pixel/s2
	private static final int INITIAL_AMMO = 5;
	private float x, y, z; 
	private int ammo;
	
	public Ship(float x, float y, float z, int ammo) {
		super();
		this.x = x;
		this.y = y;
		this.z = z;
		this.ammo = INITIAL_AMMO;
	}

	public float getX() {
		return x;
	}

	public void setX(float x) {
		this.x = x;
		update();
	}

	public float getY() {
		return y;
	}

	public void setY(float y) {
		this.y = y;
		update();
	}
	
	private void update(){
		setChanged();
		notifyObservers();
	}
	
	
	
}
